﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PLCS.Domain.ErrorLibraries
{
    /// <summary>
    /// 异常库，用来迭代所有的异常信息，同时可以将解决方案存入
    /// </summary>
    public class ErrorLibrary : BaseEntity
    {
        /// <summary>
        /// 错误代码
        /// </summary>
        public string Code { set; get; }

        /// <summary>
        /// 错误信息
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// 分类（底层，通讯，业务）
        /// </summary>
        public string Kind { get; set; }

        /// <summary>
        /// 来源（输送线，堆垛机，RGV，MES，WMS，AGV）
        /// </summary>
        public string Source { get; set; }

        /// <summary>
        /// 可能的原因
        /// </summary>
        public string PossibleCause { get; set; }

        /// <summary>
        /// 方案
        /// </summary>
        public string Solution { get; set; }

        private ErrorLibrary()
        {
        }

        public ErrorLibrary(string code, string message, string kind, string source, string possibleCause, string solution)
        {
            Code = code;
            Message = message;
            Kind = kind;
            Source = source;
            PossibleCause = possibleCause;
            Solution = solution;
        }
    }
}